{% extends 'base.html' %}
{% block title %}重置密码{% endblock %}
{% block css %}{% endblock %}
{% block main-title %}重置密码{% endblock %}
{% block breadcrumb %}
    <li>
        <a href="{% url 'index' %}">驾驶舱</a>
    </li>
    <li>
        <a href="{% url 'ldap_users:user-list' %}">用户管理</a>
    </li>
    <li>
    <strong>重置密码</strong>
    </li>
{% endblock %}
{% block wrapper-content %}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox">
                <div class="ibox-title">
                    <h5>重置 {{ username }} 的密码</h5>
                </div>
                <div class="ibox-content">
                       <form class="form-horizontal" action="" method="post">
                                <p>请输入两次密码，并确保两次输入的密码一致。</p>
                                {% csrf_token %}
                                <div class="hr-line-dashed"></div>
                                <div class="form-group {% if form.errors.password %}has-error{% endif %}">
                                    <label class="col-lg-2 control-label">新密码:</label>
                                    <div class="col-lg-4">
                                        <input type="password"  class="form-control" name="password">
                                        {% if form.errors.password %}
                                        <span class="help-block m-b-none">{% for error in form.errors.password %}{{ error }}{% endfor %}</span>
                                        {% endif %}
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group {% if form.errors.password2 %}has-error{% endif %}">
                                    <label class="col-lg-2 control-label">新密码确认:</label>
                                    <div class="col-lg-4">
                                        <input type="password" class="form-control" name="password2">
                                         {% if form.errors.password2%}
                                        <span class="help-block m-b-none">{% for error in form.errors.password2 %}{{ error }}{% endfor %}</span>
                                        {% endif %}
                                    </div>
                                </div>
                                <div class="hr-line-dashed"></div>
                                <div class="form-group">
                                    <div class="col-lg-offset-2 col-lg-4">
                                        <button class="btn btn-sm btn-primary" type="submit">重置密码</button>
                                    </div>
                                </div>
                            </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
{% block js %}
    <script>
        $('.ldap').addClass('active');
        $('.ldap .account').addClass('active');
    </script>
{% endblock %}
